#!/bin/ksh
#
# lblet Howlink linkBackup Application client component.
#
### END INIT INFO

# Copyright 2020 Howlink, Inc.
#
# Based in part on a shell script by
# Andreas Dilger <598223084@qq.com>  Sep 26, 2001

root=/opt/howlink/linkBackup

usage ()
{
	echo $"Usage: $0 {start|stop|restart}" 1>&2
	RETVAL=2
}

start ()
{
  chmod 755 $root/start.sh
  . $root/start.sh
}

stop ()
{
  chmod 755 $root/stop.sh
  . $root/stop.sh
}

restart ()
{
	stop
	start
}

case "$1" in
    stop) stop ;;
    start) start ;;
    restart) restart ;;
    *) usage ;;
esac

exit $RETVAL